{include 'admin/layout/header_list'}
<link rel="stylesheet" href="__ADMIN_STATIC__/css/pop_window.css?random={extendSetting('random')}">
{if isset($rowData["lastVersion"]["isNew"]) && $rowData["lastVersion"]["isNew"] == 1}
<form class="ajaxForm" method="post" >
    <input type="hidden" class="id" value="{$rowData['lastVersion']['id']}" >
    <input type="hidden" name="_method" value="post">
    <div class="pop3Title">
        <p style="padding-left: 0;">发现新的面板版本，是否立即更新？</p>
    </div>
    <div class="msg">
        <p>最新版本：
            <span class="version">{$rowData["lastVersion"]["stageFormat"]}</span>
        </p>
        <p>版本号：
            <span class="size">{$rowData["lastVersion"]["version"]}</span>
        </p>
    </div>
    <article class="intro1">
        <p>版本更新-{$rowData["lastVersion"]["projectFormat"]} {$rowData["lastVersion"]["stageFormat"]}</p>
        <div class="introContent">{$rowData["lastVersion"]["content"]}</div>
    </article>
    <p class="reset-button">
        <label style="float:left;" for="incUp">增量<input id="incUp"  type="checkbox" checked value="1" /></label>
        <button id="submit" style="width: fit-content;"><span data-href="{LTCMS_ROUTE_PREFIX}/systemUpgrade/download?id={$rowData["lastVersion"]["id"]}" onclick="next(this)" style="color: #fff;">立即更新</a></button>
        <button id="cancel" style="width: fit-content;" onclick="popClose()">忽略本次更新</button>
    </p>
</form>
{else}
<p style="text-align:center;" >{$rowData["lastVersion"]["projectFormat"]} {$rowData["lastVersion"]["stageFormat"]} {$rowData["lastVersion"]["version"]} 当前已是最新版本，无需更新</p>
<p class="reset-button">
    <button id="cancel" onclick="popClose()">关闭</button>
</p>
{/if}
<script>
    function next(obj){
        var incUp=$("#incUp").is(":checked")?1:0;
        var href=$(obj).data("href");
        window.location.href=href+"&incUp="+incUp;
    }
    function popClose(){
        var topWindow=$(window.parent.document);
        topWindow.find(".ltcms-edit").remove();
    }
</script>
{include 'admin/layout/footer'}